package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgClaseProg generated by hbm2java
 */
@Entity
@Table(name = "CG_CLASE_PROG", schema = "UPET")
public class CgClaseProg implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1543617291188428668L;
	private String cclaseProg;
	private String dclaseProg;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private String mclaseProd;
	private Set<CgPrograma> cgProgramas = new HashSet<CgPrograma>(0);

	public CgClaseProg() {
	}

	public CgClaseProg(String cclaseProg) {
		this.cclaseProg = cclaseProg;
	}

	public CgClaseProg(String cclaseProg, String dclaseProg, String cusuario,
			Date fhingreso, Date fhmodificacion, String mclaseProd,
			Set<CgPrograma> cgProgramas) {
		this.cclaseProg = cclaseProg;
		this.dclaseProg = dclaseProg;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.mclaseProd = mclaseProd;
		this.cgProgramas = cgProgramas;
	}

	@Id
	@Column(name = "C_CLASE_PROG", unique = true, nullable = false, length = 6)
	public String getCclaseProg() {
		return this.cclaseProg;
	}

	public void setCclaseProg(String cclaseProg) {
		this.cclaseProg = cclaseProg;
	}

	@Column(name = "D_CLASE_PROG", length = 40)
	public String getDclaseProg() {
		return this.dclaseProg;
	}

	public void setDclaseProg(String dclaseProg) {
		this.dclaseProg = dclaseProg;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "M_CLASE_PROD", length = 1)
	public String getMclaseProd() {
		return this.mclaseProd;
	}

	public void setMclaseProd(String mclaseProd) {
		this.mclaseProd = mclaseProd;
	}

	@OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY, mappedBy = "cgClaseProg")
	public Set<CgPrograma> getCgProgramas() {
		return this.cgProgramas;
	}

	public void setCgProgramas(Set<CgPrograma> cgProgramas) {
		this.cgProgramas = cgProgramas;
	}

}
